package com.runshu.newsmartark.adapter;

import androidx.annotation.Nullable;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.runshu.newsmartark.R;
import com.runshu.newsmartark.entity.FaceManagerBean;

import java.util.List;

/**
 * Demo class
 *
 * @author yu
 * @date 2020/8/27
 * @decs：
 */

public class MyFaceAdapter extends BaseQuickAdapter<FaceManagerBean, BaseViewHolder> {
    public MyFaceAdapter(@Nullable List<FaceManagerBean> data) {
        super(R.layout.item_face_manager, data);
    }

    @Override
    protected void convert(BaseViewHolder helper, FaceManagerBean item) {
        helper.setText(R.id.tv_no, String.valueOf(helper.getAdapterPosition() + 1));
        helper.setText(R.id.tv_name, item.getUsername());
        helper.setText(R.id.tv_code, item.getUsercode());
        helper.setText(R.id.tv_create_date, item.getCreateTime());
        helper.setText(R.id.tv_title, item.getOffice()+" / "+item.getPosition() );
    }
}